package com.rebate.service.impl;

import java.util.List;

import com.rebate.dao.IBaseDao;
import com.rebate.service.IBaseService;
import com.rebate.util.Page;

public class BaseServiceImpl<T> implements IBaseService<T> {

	private IBaseDao<T> baseDao;
	
	@Override
	public long create(T pojo) {
		return baseDao.create(pojo);
	}

	@Override
	public boolean delete(long id) {
		return baseDao.delete(id);
	}

	@Override
	public boolean update(T pojo) {
		return baseDao.update(pojo);
	}

	@Override
	public T findById(long id) {
		return baseDao.findById(id);
	}

	@Override
	public List<T> findBySelective(Object data) {
		return baseDao.findBySelective(data);
	}

	@Override
	public <T> Page<T> queryForListPage(Page<T> page, Object obj) {
		return baseDao.queryForListPage(page, obj);
	}
	
	public void setBaseDao(IBaseDao baseDao) {
		this.baseDao = baseDao;
	}
}
